﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site2.Master" AutoEventWireup="true"
    CodeBehind="Detail.aspx.cs" Inherits="ipaidabribe.Detail" %>

<%@ Import Namespace="ipaidabribe" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <div class="container">
        <div class="menutp">
            <ul>
                <li><a href="#" title="">Hà nội</a></li>
                <li><a href="#" title="">Hồ chí minh</a></li>
                <li><a href="#" title="">Huế</a></li>
                <li><a href="#" title="">Đà nẵng</a></li>
            </ul>
        </div>
        <!--Danh sách tin trang chủ-->
        <div class="lstnews">
            <div class="newsitem">
                <div class="newsitem_f">
                    <div class="date_f">
                        <asp:Label ID="lblDatePaid" runat="server" Text="Label"></asp:Label>
                    </div>
                    <div class="ago_f">
                        Cách đây
                    </div>
                    <div class="ago_strong_f">
                        <asp:Label ID="lblDateAgo" runat="server" Text="Label"></asp:Label>
                    </div>
                    <div class="clear">
                    </div>
                </div>
                <div class="newsitem_c">
                    <div class="newsitem_c_title">
                        <asp:Label ID="lblTitle" runat="server" Text="Label"></asp:Label>
                    </div>
                    <div>
                        <strong style="font-size: 13px;">Số tiền đưa (<asp:Label ID="lblBribeType" runat="server"
                            Text="Label"></asp:Label>):</strong><span class="sotien">&nbsp;<asp:Label ID="lblAmountPaid"
                                runat="server" Text="Label"></asp:Label></span> <span class="icon_f"></span>
                    </div>
                    <div class="newsitem_c_end" style="border: none;">
                        Thành phố: <strong>
                            <asp:Label ID="lblCity" runat="server" Text="Label"></asp:Label></strong> <span style="padding-left: 20px;">Lĩnh vực: <strong>
                                <asp:Label ID="lblDepartments" runat="server" Text="Label"></asp:Label></strong>
                            </span>
                    </div>
                    <div class="newsitem_c_detail" style="border: none;">
                        <asp:Label ID="lblContent" runat="server" Text="Label"></asp:Label>
                    </div>
                    <div class="clear">
                    </div>
                    <!-- AddThis Button BEGIN -->
                   <%-- <div class="addthis_toolbox addthis_default_style ">
                        <a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a><a class="addthis_counter addthis_bubble_style"></a>
                    </div>
                    <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4e76b0fe63b348c4"></script>--%>
                    <!-- AddThis Button END -->
                </div>
            </div>
            <div class="newsitem" style="text-align: left; padding-top: 0px; padding-bottom: 5px; border-top: 0px;">
                <span class="binhluan_f">
                    <img src="images/icon.binhluan.jpg" alt="" /><strong>Bình luận(<asp:Label ID="lblTotalComment"
                        runat="server" Text="Label"></asp:Label>)</strong></span>
            </div>
            <%--Bình luận--%>
            <asp:Repeater ID="Repeater1" runat="server">
                <ItemTemplate>
                    <div class="newsitem">
                        <div class="newsitem_c_comment">
                            <div>
                                <strong style="font-size: 13px;">
                                    <%#HttpUtility.HtmlDecode(DataBinder.Eval(Container.DataItem, "Title").ToString())%></strong>
                                <span class="time-ago"><%# Utils.ToAgoTime(Convert.ToDateTime(DataBinder.Eval(Container.DataItem, "DateReport")))%>
                                </span>

                            </div>
                            <div class="newsitem_c_comment_content" style="border-bottom: none;">
                                <%# HttpUtility.HtmlDecode(DataBinder.Eval(Container.DataItem, "Content").ToString()).Replace(Char.ConvertFromUtf32(13).ToString(), "<br>")%>
                            </div>
                            <div class="clear">
                            </div>
                        </div>
                    </div>
                </ItemTemplate>
            </asp:Repeater>
            <div class="clear" style="background-color: White;">
            </div>
        </div>
        <%--form nhập bình luận--%>
        <div class="newsitem" style="text-align: left; border-bottom: none; padding-bottom: 0px;">
            <span class="binhluan_f">
                <img src="images/icon.binhluan.jpg" alt="" /><strong>Gửi bình luận</strong></span>
        </div>
        <div class="frmComment">
            <table>
                <tbody>
                    <tr>
                        <td colspan="2"></td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:Label ID="lblError" runat="server" Text="Label" ForeColor="Red" Visible="false"></asp:Label>
                        </td>
                    </tr>

                    <tr>
                        <td colspan="2">
                            <label for="subject">
                                Tên hiển thị (không nhất thiết là tên thật)</label><br />
                            <asp:TextBox ID="txt_name" runat="server" TextMode="SingleLine" Width="350"></asp:TextBox>
                              <div class="errorLogin" style="margin-top: 7px; display: none;" id="err_name" runat="server">
                        <strong class="sprite_icon errorIcon" style="color: Red;">Chưa nhập tên hiển thị</strong></div>
                        </td>
                    </tr>
                   <%-- <script src="/script/elrte-1.3/js/jquery-1.6.1.min.js" type="text/javascript" charset="utf-8"></script>
	                <script src="/script/elrte-1.3/js/jquery-ui-1.8.13.custom.min.js" type="text/javascript" charset="utf-8"></script>
	                <link rel="stylesheet" href="/script/elrte-1.3/css/smoothness/jquery-ui-1.8.13.custom.css" type="text/css" media="screen" charset="utf-8">

	                <!-- elRTE -->
	                <script src="/script/elrte-1.3/js/elrte.min.js" type="text/javascript" charset="utf-8"></script>
	                <link rel="stylesheet" href="/script/elrte-1.3/css/elrte.min.css" type="text/css" media="screen" charset="utf-8">

	                <!-- elRTE translation messages -->
	                <script src="/script/elrte-1.3/js/i18n/elrte.ru.js" type="text/javascript" charset="utf-8"></script>

	                <script type="text/javascript" charset="utf-8">
	                    var $j_editor = jQuery.noConflict();
	                    $j_editor(document).ready(function () {
	                        var opts = {
	                            cssClass: 'el-rte',
	                            // lang     : 'ru',
	                            height: 150,
	                            toolbar: 'tiny',
	                            allowSource: false,
	                            cssfiles: ['css/elrte-inner.css']
	                        }
	                        $j_editor('#<%=txt_addi_info.ClientID %>').elrte(opts);

	                    })
	                </script>--%>
                    
                    <link href="/script/jQuery-TE_v.1.4.0/jquery-te-1.4.0.css" rel="stylesheet" />
                    
                    <script src="/script/jQuery-TE_v.1.4.0/jquery.min.js"></script>
                    <script src="/script/jQuery-TE_v.1.4.0/jquery-te-1.4.0.min.js"></script>
                    
                    <tr>
                        <td colspan="2">
                             <div style="width:651px;">
                            <br />
                            <label for="comment">
                                Nội dung</label><br>
                                <textarea id="txt_addi_info" runat="server" cols="20" rows="2"></textarea>
             
                             <div class="errorLogin" style="margin-top: 7px; display: none;" id="err_content" runat="server">
                        <strong class="sprite_icon errorIcon" style="color: Red;">Chưa nhập nội dung bình luận</strong></div>
                                 </div>
                        </td>
                    </tr>
                    <script>
                        var $j_editor = jQuery.noConflict();
                        
                        $j_editor('#<%=txt_addi_info.ClientID %>').jqte();
                    </script>
                    <tr>
                        <td colspan="2">
                            <br />
                            <label for="security_code">
                                Nhập mã bảo vệ</label>
                            <br />
                            <asp:Image ID="Image1" runat="server" ImageUrl="~/CaptchaHandler.ashx" />
                            <br />
                            <asp:TextBox ID="txt_security_code" runat="server"></asp:TextBox>
                             <div class="errorLogin" style="margin-top: 7px; display: none;" id="err_code" runat="server">
                        <strong class="sprite_icon errorIcon" style="color: Red;">Chưa nhập mã xác nhận</strong></div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <img src="images/ajax-loader.gif" style="display: none;" id="loading_image_register"/>
                            <asp:Button ID="btnSubmit" runat="server" Text="Đăng bình luận" OnClick="btnSubmit_Click"/>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <!--End danh sách tin trang chủ-->
        <div>
            <img src="images/bg.endnews.png" alt="" />
        </div>
        <div class="clear">
        </div>
    </div>
    <script src="http://code.jquery.com/jquery-latest.js"></script>
    <script>
        var $j_19 = jQuery.noConflict();
        $j_19('#<%=btnSubmit.ClientID%>').click(function () {

            var check = true;

            var name = $j_19('#<%=txt_name.ClientID %>').val();
            var content = $j_19('#<%=txt_addi_info.ClientID %>').val();
            var code = $j_19('#<%=txt_security_code.ClientID %>').val();
            
            if ((name != '') && (content !='') && (code != ''))
                check = true;

            if (name == '') {
                $j_19('#<%=err_name.ClientID %>').show();
                check = false;
            }
       
            if (code == '') {
                $j_19('#<%=err_code.ClientID %>').show();
                check = false;
            }
            if (check == false) {
                $j_19('#<%=btnSubmit.ClientID%>').val("Đăng bình luận");
                $j_19('#<%=btnSubmit.ClientID%>').removeAttr("disabled");
            }
            else {
                $j_19('#<%=btnSubmit.ClientID%>').hide();
                $("#loading_image_register").show();
            }
            return check;
        });
    </script>
</asp:Content>
